﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pg.BioMedics.SDR.Services
{
    /// <summary>
    /// Inteface implmented by service exposing functionalit for 
    /// application autentication / authorization related tasks
    /// </summary>
    public interface ISecurityService : IService
    {
        /// <summary>
        /// Provides user credentials and status validation logic. 
        /// </summary>
        /// <param name="login">User login</param>
        /// <param name="password">User password</param>
        /// <returns>Returns true if user login and password are corect and if user is in active state</returns>
        bool ValidatePerson(string login, string password);

        /// <summary>
        /// Provides user existance and status validation logic. 
        /// </summary>
        /// <param name="login">User login</param>
        /// <returns>Returns true if user exists and is in active state</returns>
        bool ValidatePerson(string login);

        /// <summary>
        /// Enumerates all roles assigned to the user defined by his/her login
        /// </summary>
        /// <param name="login">User login</param>
        /// <returns>Returns array of role names</returns>
        string[] GetRolesForPerson(string login);
    }
}
